package com.ruoyi.system.controller;

import com.ruoyi.system.domain.AreaVo;
import com.ruoyi.system.service.IFactoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/echarts")
public class EchartsController {
    @Resource
    private IFactoryService factoryService;

    @GetMapping("/area")
    public List<AreaVo> getAreaByGroup(){
        return factoryService.getAreaByGroup();
    }

    @GetMapping("/factoryLocation")
    public List<AreaVo> getNumByGroup(){
        return factoryService.getNumByGroup();
    }
}
